import { Component, EventEmitter, Input, Output } from '@angular/core';

@Component({
  selector: 'app-paginator',
  templateUrl: './paginator.component.html',
  styleUrls: ['./paginator.component.scss']
})
export class PaginatorComponent {

  @Input()
  pageIndex = 1;
  @Input()
  nzTotal = 51066444;
  @Input()
  nzPageSize = 10;


  // 把当前页码告诉父组件  父组件接受页面变化的事件  搜索
  pageChange(): number {
    this.pageIndexChange.emit(this.pageIndex);
   return this.pageIndex;
  }

  @Output() 
  pageIndexChange = new EventEmitter<number>();
}
